package values.common
{
import core.Configuration;

import mx.utils.StringUtil;

/**
 * SimplePlayerValue
 * @author jliang
 *
 */
public class SimplePlayerValue
{
	private var _playerID:String;

	public function get playerID():String
	{
		return _playerID;
	}

	public function set playerID(value:String):void
	{
		_playerID = value;
	}
	
	private var _firstName:String = "";

	public function get firstName():String
	{
		return _firstName;
	}

	public function set firstName(value:String):void
	{
		_firstName = value;
	}
	
	private var _lastName:String = "";

	public function get lastName():String
	{
		return _lastName;
	}

	public function set lastName(value:String):void
	{
		_lastName = value;
	}
	
	public function get fullName():String
	{
		if (lastName == null || lastName == "")
		{
			return firstName;
		}
		return firstName + " " + lastName;
	}

	private var _verifyType:int = -1;
	
	public function get verifyType():int
	{
		return _verifyType;
}
	
	public function set verifyType(value:int):void
	{
		_verifyType = value;
		var list:* = Configuration.getSocialService("get_verify_icon");
		list = list.icon;
		var url:String;
		for (var i:int = 0; i < list.length(); i++)
		{
			var types:Array = String(list[i].@types).split(",");
			for each (var temp:String in types)
			{
				if (verifyType == int(StringUtil.trim(temp)))
				{
					url =  String(list[i]);
					if (int(list[i].@is_related_url) == 1)
					{
						url = Configuration.assetsPath + url;
					}
					break;
				}
			}
		}
		
		_verifyTypeIcon = url;
	}
	
	private var _verifyTypeIcon:String;
	
	public function get verifyTypeIcon():String
	{
		return _verifyTypeIcon;
	}
	
	public function set verifyTypeIcon(value:String):void
	{
		_verifyTypeIcon = value;
	}
	
	public var params:* = {};
	
	public var level:int = 1;
    
    public var avatarType:String;

}
}



